<?php

class imageInList{
/*
*This method builds the line for an image:
*<li class="photo"><a rel="[gall1]" href="big_picture"><img src="thumb_big_picrure" width="200px" height="150px"/></a></li>
*
*/

	//Propreties
	private $fullImagePath;
	private $isSelectable = false;
	private $size = "";

	//Methods
	public function __construct($newImagePath)
	{
		$this->fullImagePath = $newImagePath;
	}
	
	public function setSelectable()
	{
		$this->isSelectable = true;
	}

	public function printImage($width, $heigth)
	{
		$toReturn = "";
		$toReturn .= '<li class="photo">';
		if($this->isSelectable == true){
		$toReturn .= '<div id="selectImage" class="selectable">';		
		}else{
		$toReturn .= '<div rel="Gallery">';
		}
		$toReturn.='<img src="'.$this->fullImagePath.'" width="'.$width.'" height="'.$heigth.'"/>';
		$toReturn.='</div>';
		$toReturn.='</li>';
		
		return $toReturn;
	}
}
?>